#pragma once
#include "model\BaseModel.h"
#include "service\storage\file\PlayerFileService.h"
#include <string>
#include <vector>

class Player : public BaseModel {
public:
  // constructors and destructor
  Player();
  explicit Player(int id);
  explicit Player(std::string name);
  Player(int id, std::string name, std::string address);
  virtual ~Player();

  // mutators
  void set_id(const int id);
  void set_name(const std::string& name);
  void set_address(const std::string& address);

  // accessors
  int id() const;
  std::string name() const;
  std::string address() const;


  // comparison operators
  bool operator<(const Player& player) const;
  bool operator==(const Player& player) const;

  // validation function
  virtual bool Validate();

private:
  std::string NameChars();
  std::string AddrChars();

  // friendly input and output operators
  friend std::istream& operator>>(std::istream& in, Player& s);
  friend std::ostream& operator<<(std::ostream& out, const Player& s);

  int id_;
  std::string name_;
  std::string address_;
};